/*
	FileName : CopyFileToUsb.h
	Description : 
		
	Created on 2018.11.6 by ZZP.
	
	Revision History:
	
*/

#ifndef __COPY_FILE_TO_USB_H__
#define __COPY_FILE_TO_USB_H__

#include "stdint.h"
#include "JT_C_Memory.h"


//////////////////////////////////////////////////////////////////////////////
///
//////////////////////////////////////////////////////////////////////////////
///Copy state
#define COPY_STATE_IDLE					0
#define COPY_STATE_INIT					1
#define COPY_STATE_CFG_INFO				2
#define COPY_STATE_TRAIN_DIR			3
#define COPY_STATE_DATA_DIR				4
#define COPY_STATE_ANALOG_NO			5
#define COPY_STATE_DIGITAL				6
#define COPY_STATE_ANALOG				7
#define COPY_STATE_POWER				8
#define COPY_STATE_FINAL				9


///?????:APP ? USB
#define PROGRAM_APP						0
#define PROGRAM_USB						1

///USB ????:? APP ???
///APP ??? USB ???????
#define CLEAR_USB_TRAIL					0xff
///USB ???
#define USB_TRAIL_OK_NOT_PULL_OUT		0x00
#define USB_TRAIL_ERR2_NOT_PULL_OUT		0x02
#define USB_TRAIL_ERR3_NOT_PULL_OUT		0x03
#define USB_TRAIL_ERR4_NOT_PULL_OUT		0x04
#define USB_TRAIL_ERR10_NOT_PULL_OUT	0x0a
#define USB_TRAIL_ERR15_NOT_PULL_OUT	0x0f
///USB ???
#define USB_TRAIL_OK_PULL_OUT			0x80
#define USB_TRAIL_ERR_PULL_OUT			0x89


//////////////////////////////////////////////////////////////////////////////
///
//////////////////////////////////////////////////////////////////////////////
uint8_t CreateDir(const uint8_t *path);
uint8_t CreateFile(uint8_t FileType);
void CopyBigFile(void);
uint8_t CopyUsbFiles(void);

void SetCopyInfo(void);
void UpdateUsbCopyStatus(uint8_t err);


#endif///



